package com.huawei.controller;

import org.springframework.web.bind.annotation.*;
import org.springframework.security.access.prepost.PreAuthorize;

@RestController
@RequestMapping("/vr")
public class VRController {
    
    @GetMapping("/courses/{id}")
    @PreAuthorize("hasAnyAuthority('admin','teacher','student')")
    public String getVRCourse(@PathVariable Long id) {
        // 获取VR课程资源
        return "VR course data for " + id;
    }
    
    @PostMapping("/interaction")
    @PreAuthorize("hasAnyAuthority('admin','teacher','student')")
    public String handleInteraction(@RequestBody String interactionData) {
        // 处理多用户VR互动
        return "Interaction processed: " + interactionData;
    }
}